package com.qf.cx.simplenms.link.rai;

import com.qf.cx.simplenms.link.rai.model.Antenna;
import com.qf.cx.simplenms.link.rai.model.InventoryResult;
import com.qf.cx.simplenms.link.rai.model.RwPara;
import com.qf.cx.simplenms.link.rai.model.RwResult;
import com.sun.jna.*;
import com.sun.jna.ptr.IntByReference;

/*
 * 按照jna规范，适配底层C语言动态库的基本接口
 * */
public interface RaiLibrary extends Library {
	
	public int rai_inventory(int fd, Antenna.ByReference antenna, InventoryResult.ByReference result);
	public int rai_startPeriodOp(int fd, RwPara.ByReference antenna,int timespan);
	public int rai_getPeriodOpResult(int fd, int timeout, RwResult.ByReference result);
	public int rai_stopPeriodOp(int fd);
	
	public int rai_connect(String url, IntByReference fd);
	public int rai_disConnect(int fd);
	public int rai_getLinkStatus(int fd);
	public int rai_startListen(String url,IntByReference fd);
	public int rai_getListenLink(int listenfd, IntByReference fd);
	public int rai_stopListen(int listenfd);
	public int rai_getDeviceSN(int fd,byte[] deviceSN);

}



